// src/store/modules/tabs.js
const state = {
  defaultTab: "1", // 默认选项卡的 ID
};

const mutations = {
  setDefaultTab(state, tabId) {
    state.defaultTab = tabId;
  },
};

const actions = {
  updateDefaultTab({ commit }, tabId) {
    commit("setDefaultTab", tabId);
  },
};

const getters = {
  defaultTab: (state) => state.defaultTab,
};

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters,
};
